package com.itheima.health.dao;

import com.itheima.health.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReportDao {
    @Select("select count(*) from t_member where regTime <= #{end}")
    Integer selectmemberCount(LocalDate start, LocalDate end);

    @Select("select * from t_setmeal")
    List<Setmeal> selectSetmealNames();

    @Select("select count(*) from t_order where setmeal_id = #{id}")
    Integer selectSetmealCount(Integer id);


    Integer selectcountMember(LocalDate startday, LocalDate endday);

    Integer selectcountOrder(LocalDate startday, LocalDate endday,String orderStatus);

    Integer selectCountOrderBysetmeal(Integer id);

    @Select("select * from t_setmeal")
    List<Setmeal> selectallSetmeal();
}
